home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
syswit
/
syswitch.frm
< prev
next >
Wrap
Text File
|
1995-05-08
|
7KB
|
230 lines
VERSION 2.00
Begin Form lalal
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "SySwitch 2.0"
ClientHeight = 3420
ClientLeft = 2085
ClientTop = 2205
ClientWidth = 4365
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00C0C0C0&
Height = 4110
Icon = SYSWITCH.FRX:0000
Left = 2025
LinkMode = 1 'Source
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3420
ScaleWidth = 4365
Top = 1575
Width = 4485
Begin OptionButton Option1
BackColor = &H00C0C0C0&
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Index = 4
Left = 360
TabIndex = 7
Top = 2715
Width = 3705
End
Begin OptionButton Option1
BackColor = &H00C0C0C0&
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Index = 3
Left = 345
TabIndex = 6
Top = 2310
Width = 3705
End
Begin OptionButton Option1
BackColor = &H00C0C0C0&
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Index = 2
Left = 345
TabIndex = 5
Top = 1935
Width = 3705
End
Begin OptionButton Option1
BackColor = &H00C0C0C0&
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Index = 1
Left = 345
TabIndex = 4
Top = 1515
Width = 3705
End
Begin OptionButton Option1
BackColor = &H00C0C0C0&
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 375
Index = 0
Left = 345
TabIndex = 3
Top = 1125
Width = 3705
End
Begin CommandButton Command1
Cancel = -1 'True
Caption = "Cancel"
Height = 375
Left = 3255
TabIndex = 2
Top = 615
Width = 855
End
Begin CommandButton Command2
Caption = "Restart"
Height = 375
Left = 3240
TabIndex = 0
Top = 150
Width = 855
End
Begin Label Label1
BackColor = &H00C0C0C0&
Caption = "Select configuration to be used for the SYSTEM.INI file: "
Height = 720
Left = 420
TabIndex = 1
Top = 345
Width = 2235
End
Begin Menu FileMenu
Caption = "&File"
Begin Menu FileConfig
Caption = "&Configure..."
End
Begin Menu FileSep
Caption = "-"
End
Begin Menu FileExit
Caption = "E&xit"
End
End
Begin Menu HelpMenu
Caption = "&Help"
Begin Menu HelpInstructions
Caption = "&Instructions"
End
Begin Menu HelpSeparator
Caption = "-"
End
Begin Menu AboutSySwitch
Caption = "&About..."
End
End
End
DefInt A-Z
Const TRUE = -1
Const FALSE = 0
Sub AboutSySwitch_Click ()
Load form2
form2.Show 1
End Sub
Sub Command1_Click ()
Unload Config
Unload LALAL
End
End Sub
Sub Command2_Click ()
If Option1(0).Value = True Then Call CopyFile(ConfigFile(1))
If Option1(1).Value = True Then Call CopyFile(ConfigFile(2))
If Option1(2).Value = True Then Call CopyFile(ConfigFile(3))
If Option1(3).Value = True Then Call CopyFile(ConfigFile(4))
If Option1(4).Value = True Then Call CopyFile(ConfigFile(5))
End Sub
Sub FileConfig_Click ()
WasRecordChanged = False
Config.Combo1.Listindex = GetHighLight()
Config.Show 1
End Sub
Sub FileExit_Click ()
Unload LALAL
End
End Sub
Sub Form_Load ()
ReadProf
Option1(0).Value = True
Load Config
Config.Combo1.Listindex = 0
MyPointer& = GetDosEnvironment&()
MyLen = LStrLen(MyPointer&)
Do
Mystring$ = LP2Str$(ByVal MyPointer&, MyLen)
x = Len(Mystring$)
If Left$(Mystring$, 7) = "windir=" Then WinDir = RTrim$(Right$(Mystring$, x - 7))
MyPointer& = MyPointer& + MyLen + 1
MyLen = LStrLen(MyPointer&)
Loop Until MyLen = 0
Config.Label4.Caption = WinDir
HandOff = False
End Sub
Sub Form_Paint ()
If HandOff = True Then Option1(Config.Combo1.Listindex).Value = True: Option1(Config.Combo1.Listindex).SetFocus
HandOff = False
Option1(0).Caption = ConfigName(1)
Option1(1).Caption = ConfigName(2)
Option1(2).Caption = ConfigName(3)
Option1(3).Caption = ConfigName(4)
Option1(4).Caption = ConfigName(5)
Call Frame(LALAL, Option1(0).Left - 45, Option1(0).Top - 45, Option1(4).Top + Option1(4).Height + 90 - Option1(0).Top, Option1(4).Left + Option1(4).Width + 90 - Option1(0).Left)
Call Frame2(LALAL, 60, 60, LALAL.Height - 720, LALAL.Width - 150)
End Sub
Function GetHighLight () As Integer
For i = 0 To 4
If Option1(i).Value = True Then GetHighLight = i
Next i
End Function
Sub HelpInstructions_Click ()
Load Instructions
Instructions.Show
End Sub